<?php

$dbLocation = "127.0.0.1";
$dbname = "web-articles";
$dbuser = "root";
$dbpasswd = "root";

$dbcnx = @mysql_connect($dbLocation, $dbuser, $dbpasswd);

if (!$dbcnx) {
    echo 'mySQL server error';
    exit();
}
if (!@mysql_select_db($dbname, $dbcnx)) {
    echo 'database is unavailable';
    exit();
}

?>